package org.huntaway.material.command.model.imp;

import java.util.Collection;
import java.util.Iterator;

import org.huntaway.material.command.model.CommandVisitable;
import org.huntaway.material.command.model.CommandVisitor;

public class CommandConcreteVisitor implements CommandVisitor {

	public void visitCollection(Collection<CommandVisitable> collection) {
		Iterator<CommandVisitable> iterator = collection.iterator();
		while (iterator.hasNext()) {
			Object obj = iterator.next();
			if (obj instanceof CommandVisitable) {
				((CommandVisitable) obj).accept(this);
			}
		}		

	}

}
